package com.alliky.home.di

import androidx.paging.ExperimentalPagingApi
import com.alliky.core.data.db.AppDatabase
import com.alliky.core.net.RetrofitKt
import com.alliky.home.ui.viewmodel.HomeViewModel
import com.rrc.common.api.ApiService
import org.koin.android.ext.koin.androidApplication
import org.koin.androidx.viewmodel.dsl.viewModel
import org.koin.dsl.module

/**
 * ================================================
 * @Description: 描述
 * @Author: wxianing
 * @Date: 2023/10/23 18:24
 * ================================================
 */
@ExperimentalPagingApi
val moduleHome = module {
    single { RetrofitKt.getRetrofit()!!.create(ApiService::class.java) }
    single { AppDatabase.get(androidApplication()) }
    viewModel { HomeViewModel(get()) }
}